package ai.think.cloud.chat.controller;


import ai.think.cloud.chat.service.OpenAiChatService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Acer
 */
@RestController
@RequestMapping("/ai")
public class ChatController {

    @Resource
    private OpenAiChatService openAiChatService;


    @GetMapping("/chat")
    public String chat(@RequestParam("message") String message) {
        return openAiChatService.easyChat(message);
    }


}
